﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OnlineMealOrdering.Domain.Base
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)]
    public class UniqueKeyAttribute : Attribute
    {
        public string UniqueKeyNames { get; set; }

        public string ErrorMessage { get; set; }

        public UniqueKeyAttribute(string fieldNames, string errorMessage)
        {
            UniqueKeyNames = fieldNames;
            ErrorMessage = errorMessage;
        }

        public UniqueKeyAttribute(string errorMessage)
        {
            ErrorMessage = errorMessage;
        }
    }
}
